/**
 * 函数“aFunctionThatUsedToDetermineWhichTimePeriodItIsCurrentlyInByGettingTime”被用于“获取当前时间，并根据其判断当前处于哪个时间段”↓
 */
// export const aFunctionThatUsedToDetermineWhichTimePeriodItIsCurrentlyInByGettingTime = () => {
export function aFunctionThatUsedToDetermineWhichTimePeriodItIsCurrentlyInByGettingTime(){
    // 通过JS内置的构造函数“Date”获取当前时间中的小时数↓
    let hours = new Date().getHours();
    let message = ''
    console.log(hours);
    switch (true) {
        case hours < 6:
            message = '凌晨好';
            break;
        case hours < 9:
            message = '早上好';
            break;
        case hours < 12:
            message = '上午好';
            break;
        case hours < 14:
            message = '中午好';
            break;
        case hours < 17:
            message = '下午好';
            break;
        case hours < 19:
            message = '傍晚好';
            break;
        default:
            message = '晚上好';
            break;
    }
    console.log(message)
    return message;
}